# from hyperliquid.info import Info
# from hyperliquid.utils import constants
# from hyperliquid.websocket_manager import WebsocketManager


# info = Info(constants.MAINNET_API_URL, skip_ws=True)
# user_state = info.user_state("0xcd5051944f780a621ee62e39e493c489668acf4d")
# print(user_state)

from hyperliquid.utils import constants
from hyperliquid.info import Info


def main():
    address="0x0000000000000000000000000000000000000000"
    # address, info, _ = example_utils.setup(constants.TESTNET_API_URL)
    info = Info(constants.MAINNET_API_URL, False)
    # An example showing how to subscribe to the different subscription types and prints the returned messages
    # Some subscriptions do not return snapshots, so you will not receive a message until something happens
    info.subscribe({"type": "allMids"}, print)
    info.subscribe({"type": "l2Book", "coin": "ETH"}, print)
    info.subscribe({"type": "trades", "coin": "BTC"}, print)
    info.subscribe({"type": "userEvents", "user": address}, print)
    info.subscribe({"type": "userFills", "user": address}, print)
    info.subscribe({"type": "candle", "coin": "ETH", "interval": "1m"}, print)
    info.subscribe({"type": "orderUpdates", "user": address}, print)
    info.subscribe({"type": "userFundings", "user": address}, print)
    info.subscribe({"type": "userNonFundingLedgerUpdates", "user": address}, print)


if __name__ == "__main__":
    #main()
    array=["BTC-5","ETH-5"]
    for i in range(0,len(array)):
        if("BTC" in array[i]):
            print(array[i])
